package com.tsd.base.service;

import com.tsd.base.entity.BaseUnit;
import com.tsd.base.entity.BaseUnitExt;
import com.tsd.core.vo.PageBean;
import com.tsd.system.entity.SysUser;

import java.util.List;
import java.util.Map;

/**
 * 描述：BaseUnit服务实现层接口
 *
 * @author zsy
 * @date 2020/12/29 15:22:59
 */
public interface BaseUnitService {

    /**
     * 描述：根据id获取BaseUnit
     *
     * @param id
     */
    BaseUnit getBaseUnitById(Long id) throws Exception;

    /**
     * 描述：根据sid获取BaseUnit
     *
     * @param sid
     */
    BaseUnitExt queryBySid(String sid) throws Exception;

    /**
     * 描述：根据id删除BaseUnit
     *
     * @param id
     */
    void deleteBaseUnit(Long id, SysUser opUser) throws Exception;

    /**
     * 描述：根据ids批量删除BaseUnit
     *
     * @param sids
     */
    void batchDeleteUnit(List<String> sids, SysUser opUser) throws Exception;

    /**
     * 描述：保存或更新BaseUnit
     *
     * @param record
     * @param opUser
     */
    BaseUnit saveBaseUnit(BaseUnit record, SysUser opUser) throws Exception;

    /**
     * 描述：根据params分页查询BaseUnit
     *
     * @param params
     * @param page
     */
    List<BaseUnitExt> findBaseUnits(Map<String, Object> params, PageBean page) throws Exception;

    /**
     * 描述：根据params分页查询BaseUnit
     *
     * @param params
     */
    List<BaseUnitExt> findBaseUnits(Map<String, Object> params) throws Exception;
}
